package com.ics.cmsadmin.modules.basic.dao;

import com.ics.cmsadmin.frame.core.enums.LevelEnum;
import com.ics.cmsadmin.modules.basic.bean.Collect;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CollectionDao {

    int insert(Collect collect);

    int insert(@Param("userId") String userId,
               @Param("levelName") LevelEnum levelName,
               @Param("levelId") String levelId);

    List<Collect> findByUserId(@Param("userId") String userId);

    Boolean select(Collect collect);

    Boolean select(@Param("userId") String userId,
                   @Param("levelName") LevelEnum levelName,
                   @Param("levelId") String levelId);

    int delete(Collect collect);

    int delete(@Param("userId") String userId,
               @Param("levelName") LevelEnum levelName,
               @Param("levelId") Integer levelId);

    Integer queryTotal(@Param("levelName") LevelEnum levelName,
                       @Param("levelId") String levelId);
}
